]> dgit.raspbian.org Git - gnome-shell.git/commit
cleanup: Avoid "lonely" ifs where it makes sense
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 20 Aug 2019 02:10:46 +0000 (04:10 +0200)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 11 Nov 2019 19:25:14 +0000 (19:25 +0000)
commit2e4e2500dd633a33f7fa45d5982af6a6868a7329
tree804f189f8049f8a1dbe875fcf3dd37fdc1af41f3
parent67ea4245254ac3f2d5b690874c02477786f6321c
cleanup: Avoid "lonely" ifs where it makes sense

If an else block only contains an if statement, the two can be
combined into an if-else block, which cuts down on indentation
and usually helps legibility.

There are exceptions (for instance where the outer if and else
blocks are mirrored), but where it makes sense, change the code
to avoid lonely ifs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805
js/ui/altTab.js
js/ui/windowManager.js
js/ui/workspacesView.js
js/ui/xdndHandler.js